package com.yc.bank.biz;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@Service
@Transactional
public class BankService {

    @Resource
    BankBiz bankBiz;

    // 转账
    public void transfer(String aid1, String aid2, double money) throws BizException {
        bankBiz.withdraw(aid1, money);
        bankBiz.deposit(aid2, money);
    }
}
